import { lazy, Suspense } from "react";
import { Routes,Route, Navigate } from "react-router-dom";
import Home from '../pages/Home'
const Find = lazy(() => import('../pages/Find'))
const Goods = lazy(() => import('../pages/Goods'))
const Me = lazy(() => import('../pages/Me'))
const RouterConfig = () => {
    return (
        <Suspense fallback={null}>
            <Routes>
                <Route path="/" element={<Navigate to="home" replace={true} />} />
                <Route path="home" element={<Home />} />
                <Route path="find" element={<Find />} />
                <Route path="goods" element={<Goods />} />
                <Route path="me" element={<Me />} />
            </Routes>
        </Suspense>
    )
}

export default RouterConfig